// src/users/dto/create-user.dto.ts
import { IsString, IsEmail, IsOptional } from 'class-validator';
import { PartialType } from '@nestjs/swagger';
import { User } from '../entities/user.entity';
import { Role } from '../../role/entities/role.entity';

export class CreateUserDto {
  @IsString()
  username: string;

  @IsEmail()
  email: string;

  @IsOptional()
  @IsString()
  password?: string;

  @IsOptional()
  role?: Role;
}
